<?php
class MonHoc extends Eloquent {
    protected $table = 'tn_mon_hoc';
    public static function check_tag_id($tag_id) {
        if (MonHoc::where("TAG_ID", "=", $tag_id)->whereNull('PARENT_ID')->count() > 0) {
            return false;
        }
        return true;
    }
}
